#ifndef TRANSFORMERCONTENT_ERRORCODE_H_3
#define TRANSFORMERCONTENT_ERRORCODE_H_3

#include <errno.h>
#include <error.h>
#include <string.h>

///sucess, no error
#define E_TRANC_SUCESS	0
#define E_TRANC_ERROR_START -333

///port manager show the port exist, but the method should not use exist port
#define E_TRANC_PortAlreadyExist	E_TRANC_ERROR_START-1
///port manager show the port not exist, but the method should use exist port
#define E_TRANC_PortNotExist		E_TRANC_ERROR_START-2

///call instance method but the instance state not suitable!
///should call strerror() or perror() to get more details
#define E_TRANC_InsStateFailed			E_TRANC_ERROR_START-3

///call system function but failed!
///should call strerror() or perror() to get more details
#define E_TRANC_SystemError				E_TRANC_ERROR_START-4

///call method but passed error parameter
#define E_TRANC_ParamError				E_TRANC_ERROR_START-5

///pass a buffer to get info, but the buffer too small to hold all info
#define E_TRANC_BufferTooSmall			E_TRANC_ERROR_START-6

///call method on a port, which state not be allowed to do so
#define E_TRANC_OpeartionNotInvalidate	E_TRANC_ERROR_START-7

///vroute system internal logical error, usally the port state error, or instance error
#define E_TRANC_InnerLogicError			E_TRANC_ERROR_START-8

/// buffer capacity reached the max limit
#define E_TRANC_BUFFER_FULL				E_TRANC_ERROR_START-9

/// accept method received max limits count connect
#define E_TRANC_ACCEPT_FULL				E_TRANC_ERROR_START-10

/// operation timeout
#define E_TRANC_TIMEOUT					E_TRANC_ERROR_START-11

/// the method is a sync method, will not block the caller
#define E_TRANC_NONBLOCK				E_TRANC_ERROR_START-12

/// the port have no avaliable data
#define E_TRANC_NO_DATA_AVALIABLE		E_TRANC_ERROR_START-13

/// port state show the port now can not be used
#define E_TRANC_PORT_STATE_ERROR		E_TRANC_ERROR_START-14

#define E_TRANC_ACCEPT_REFUSE			E_TRANC_ERROR_START-15

#define E_TRANC_STATE_BUSY				E_TRANC_ERROR_START-16
#endif //TRANSFORMERCONTENT_ERRORCODE_H_3
